import request from "@/utils/request";
import { param } from "@/utils";

/**
 * 获取借款单列表
 */
export const getLoanList = (query, data) => {
  return request({
    url: `/finance/billCategoryNote/page/LoanBillPage?${param(query)}`,
    method:'post',
    data
  })
}

/**
 * 添加借款单
 */
export const addLoan = (data) => {
  return request({
    url: `/finance/billCategoryNote/addLoanBill`,
    method: 'post',
    data
  })
}

/**
 * 借款单详情
 */
export const getLoanDetail = (noteId) => {
  return request({
    url: `/finance/billCategoryNote/LoanBillDetail/${noteId}`,
  })
}
/**
 * 我的借款
 */
export const myLoanList=(query,data)=>{
  return request({
    url: `/finance/billCategoryNote/user/page/LoanBillPage?${param(query)}`,
    method:'post',
    data
  })
}


/**
 * 导出借款
 */
export const exportLoan = (data) => {
  return request({
    url: `/finance/excel/exportLoanBill`,
    method: 'post',
    responseType: 'blob',
    data
  })
}
